package com.appspot.ldsdrawingtool.client.services;

import com.appspot.ldsdrawingtool.client.services.stubs.UserAccountServiceStub;
import com.appspot.ldsdrawingtool.client.services.stubs.UserAccountServiceStubAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class UserAccountService {
    
    public static String userID;

    private static final UserAccountServiceStubAsync uas = GWT.create(UserAccountServiceStub.class);
    
    public static void createAnonymousUserChannel(AsyncCallback<String> callback) {
       userID = "Anonymous_" + System.currentTimeMillis();
       createUserChannel(userID, callback);
    }

    public static void createUserChannel(String userID, AsyncCallback<String> callback) {
        uas.createUserChannel(userID, callback);
    }

}
